package com.blackandwhitesensation.sice.dataaccess.dao;

import com.blackandwhitesensation.sice.modelo.UsuarioSistema;

import java.math.BigDecimal;

import java.util.Date;
import java.util.List;
import java.util.Set;


/**
 * Interface for UsuarioSistemaDAO.
 *
 * @author Zathura Code Generator http://code.google.com/p/zathura/
 */
public interface IUsuarioSistemaDAO {
    // property constants
    //public static final String  ACTIVO = "activo";
    public static final String ACTIVO = "activo";

    //public static final String  APELLIDO = "apellido";
    public static final String APELLIDO = "apellido";

    //public static final String  CONTRASEA = "contraseA";
    public static final String CONTRASEA = "contraseA";

    //public static final Long  IDUSUARIOSISTEMA = "idUsuarioSistema";
    public static final String IDUSUARIOSISTEMA = "idUsuarioSistema";

    //public static final String  NOMBRE = "nombre";
    public static final String NOMBRE = "nombre";

    //public static final String  USUARIO = "usuario";
    public static final String USUARIO = "usuario";

    /**
    * Perform an initial save of a previously unsaved UsuarioSistema entity. All
    * subsequent persist actions of this entity should use the #update()
    * method. This operation must be performed within the a database
    * transaction context for the entity's data to be permanently saved to the
    * persistence store, i.e., database. This method uses the
    * {@link javax.persistence.EntityManager#persist(Object) EntityManager#persist}
    * operation.
    *
    * <pre>
    * EntityManagerHelper.beginTransaction();
    * IUsuarioSistemaDAO.save(entity);
    * EntityManagerHelper.commit();
    * </pre>
    *
    * @param entity
    *            UsuarioSistema entity to persist
    * @throws RuntimeException
    *             when the operation fails
    */
    public void save(UsuarioSistema entity);

    /**
    * Delete a persistent UsuarioSistema entity. This operation must be performed
    * within the a database transaction context for the entity's data to be
    * permanently deleted from the persistence store, i.e., database. This
    * method uses the
    * {@link javax.persistence.EntityManager#remove(Object) EntityManager#delete}
    * operation.
    *
    * <pre>
    * EntityManagerHelper.beginTransaction();
    * IUsuarioSistemaDAO.delete(entity);
    * EntityManagerHelper.commit();
    * entity = null;
    * </pre>
    *
    * @param entity
    *            UsuarioSistema entity to delete
    * @throws RuntimeException
    *             when the operation fails
    */
    public void delete(UsuarioSistema entity);

    /**
    * Persist a previously saved UsuarioSistema entity and return it or a copy of it
    * to the sender. A copy of the UsuarioSistema entity parameter is returned when
    * the JPA persistence mechanism has not previously been tracking the
    * updated entity. This operation must be performed within the a database
    * transaction context for the entity's data to be permanently saved to the
    * persistence store, i.e., database. This method uses the
    * {@link javax.persistence.EntityManager#merge(Object) EntityManager#merge}
    * operation.
    *
    * <pre>
    * EntityManagerHelper.beginTransaction();
    * entity = IUsuarioSistemaDAO.update(entity);
    * EntityManagerHelper.commit();
    * </pre>
    *
    * @param entity
    *            UsuarioSistema entity to update
    * @return UsuarioSistema the persisted UsuarioSistema entity instance, may not be the
    *         same
    * @throws RuntimeException
    *             if the operation fails
    */
    public UsuarioSistema update(UsuarioSistema entity);

    public UsuarioSistema findById(Long id);

    /**
    * Find all UsuarioSistema entities with a specific property value.
    *
    * @param propertyName
    *            the name of the UsuarioSistema property to query
    * @param value
    *            the property value to match
    * @param rowStartIdxAndCount
    *            Optional int varargs. rowStartIdxAndCount[0] specifies the the
    *            row index in the query result-set to begin collecting the
    *            results. rowStartIdxAndCount[1] specifies the the maximum
    *            count of results to return.
    * @return List<UsuarioSistema> found by query
        */
    public List<UsuarioSistema> findByProperty(String propertyName,
        Object value, int... rowStartIdxAndCount);

    public List<UsuarioSistema> findByCriteria(String whereCondition);

    public List<UsuarioSistema> findByActivo(Object activo);

    public List<UsuarioSistema> findByActivo(Object activo,
        int... rowStartIdxAndCount);

    public List<UsuarioSistema> findByApellido(Object apellido);

    public List<UsuarioSistema> findByApellido(Object apellido,
        int... rowStartIdxAndCount);

    public List<UsuarioSistema> findByContraseA(Object contraseA);

    public List<UsuarioSistema> findByContraseA(Object contraseA,
        int... rowStartIdxAndCount);

    public List<UsuarioSistema> findByIdUsuarioSistema(Object idUsuarioSistema);

    public List<UsuarioSistema> findByIdUsuarioSistema(
        Object idUsuarioSistema, int... rowStartIdxAndCount);

    public List<UsuarioSistema> findByNombre(Object nombre);

    public List<UsuarioSistema> findByNombre(Object nombre,
        int... rowStartIdxAndCount);

    public List<UsuarioSistema> findByUsuario(Object usuario);

    public List<UsuarioSistema> findByUsuario(Object usuario,
        int... rowStartIdxAndCount);

    /**
    * Find all UsuarioSistema entities.
    *
    * @param rowStartIdxAndCount
    *            Optional int varargs. rowStartIdxAndCount[0] specifies the the
    *            row index in the query result-set to begin collecting the
    *            results. rowStartIdxAndCount[1] specifies the the maximum
    *            count of results to return.
    * @return List<UsuarioSistema> all UsuarioSistema entities
    */
    public List<UsuarioSistema> findAll(int... rowStartIdxAndCount);

    public List<UsuarioSistema> findPageUsuarioSistema(String sortColumnName,
        boolean sortAscending, int startRow, int maxResults);

    public Long findTotalNumberUsuarioSistema();
    
    // M@AURICIO
    public UsuarioSistema getUsuarioSistemaAlias(String alias)throws Exception;
    //M@URICIO
    public UsuarioSistema getUsuarioSistemaLogin(String usuario) throws Exception;
    
}
